3.14.28 \(\int \frac {(c (d \tan (e+f x))^p)^n}{(a+b \tan (e+f x))^2} \, dx\) [1328]

Optimal. Leaf size=293 \[ \frac {\left (a^2-b^2\right ) \, _2F_1\left (1,\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);-\tan ^2(e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {2 b^2 \, _2F_1\left (1,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {b^2 \, _2F_1\left (2,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a^2 \left (a^2+b^2\right ) f (1+n p)}-\frac {2 a b \, _2F_1\left (1,\frac {1}{2} (2+n p);\frac {1}{2} (4+n p);-\tan ^2(e+f x)\right ) \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (2+n p)} \]

[Out]

(a^2-b^2)*hypergeom([1, 1/2*n*p+1/2],[1/2*n*p+3/2],-tan(f*x+e)^2)*tan(f*x+e)*(c*(d*tan(f*x+e))^p)^n/(a^2+b^2)^
2/f/(n*p+1)+2*b^2*hypergeom([1, n*p+1],[n*p+2],-b*tan(f*x+e)/a)*tan(f*x+e)*(c*(d*tan(f*x+e))^p)^n/(a^2+b^2)^2/
f/(n*p+1)+b^2*hypergeom([2, n*p+1],[n*p+2],-b*tan(f*x+e)/a)*tan(f*x+e)*(c*(d*tan(f*x+e))^p)^n/a^2/(a^2+b^2)/f/
(n*p+1)-2*a*b*hypergeom([1, 1/2*n*p+1],[1/2*n*p+2],-tan(f*x+e)^2)*tan(f*x+e)^2*(c*(d*tan(f*x+e))^p)^n/(a^2+b^2
)^2/f/(n*p+2)

________________________________________________________________________________________

Rubi [A]
time = 0.28, antiderivative size = 293, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {1970, 975, 66, 822, 371} \begin {gather*} -\frac {2 a b \tan ^2(e+f x) \, _2F_1\left (1,\frac {1}{2} (n p+2);\frac {1}{2} (n p+4);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{f \left (a^2+b^2\right )^2 (n p+2)}+\frac {\left (a^2-b^2\right ) \tan (e+f x) \, _2F_1\left (1,\frac {1}{2} (n p+1);\frac {1}{2} (n p+3);-\tan ^2(e+f x)\right ) \left (c (d \tan (e+f x))^p\right )^n}{f \left (a^2+b^2\right )^2 (n p+1)}+\frac {2 b^2 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \, _2F_1\left (1,n p+1;n p+2;-\frac {b \tan (e+f x)}{a}\right )}{f \left (a^2+b^2\right )^2 (n p+1)}+\frac {b^2 \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \, _2F_1\left (2,n p+1;n p+2;-\frac {b \tan (e+f x)}{a}\right )}{a^2 f \left (a^2+b^2\right ) (n p+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*(d*Tan[e + f*x])^p)^n/(a + b*Tan[e + f*x])^2,x]

[Out]

((a^2 - b^2)*Hypergeometric2F1[1, (1 + n*p)/2, (3 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]*(c*(d*Tan[e + f*x])^
p)^n)/((a^2 + b^2)^2*f*(1 + n*p)) + (2*b^2*Hypergeometric2F1[1, 1 + n*p, 2 + n*p, -((b*Tan[e + f*x])/a)]*Tan[e
 + f*x]*(c*(d*Tan[e + f*x])^p)^n)/((a^2 + b^2)^2*f*(1 + n*p)) + (b^2*Hypergeometric2F1[2, 1 + n*p, 2 + n*p, -(
(b*Tan[e + f*x])/a)]*Tan[e + f*x]*(c*(d*Tan[e + f*x])^p)^n)/(a^2*(a^2 + b^2)*f*(1 + n*p)) - (2*a*b*Hypergeomet
ric2F1[1, (2 + n*p)/2, (4 + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]^2*(c*(d*Tan[e + f*x])^p)^n)/((a^2 + b^2)^2*f
*(2 + n*p))

Rule 66

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x)^(m + 1)/(b*(m + 1)))*Hypergeometr
ic2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] && (IntegerQ[n] || (GtQ[
c, 0] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 822

Int[((e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[f, Int[(e*x)^m*(a + c*
x^2)^p, x], x] + Dist[g/e, Int[(e*x)^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, e, f, g, p}, x] &&  !Ration
alQ[m] &&  !IGtQ[p, 0]

Rule 975

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (ILtQ[m, 0] && ILtQ[n, 0])) &&  !(IGtQ[m, 0] || IGtQ[n, 0])

Rule 1970

Int[(u_.)*((c_.)*((d_)*((a_.) + (b_.)*(x_)))^(q_))^(p_), x_Symbol] :> Dist[(c*(d*(a + b*x))^q)^p/(a + b*x)^(p*
q), Int[u*(a + b*x)^(p*q), x], x] /; FreeQ[{a, b, c, d, q, p}, x] &&  !IntegerQ[q] &&  !IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\left (c (d \tan (e+f x))^p\right )^n}{(a+b \tan (e+f x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (c (d x)^p\right )^n}{(a+b x)^2 \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p}}{(a+b x)^2 \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \left (\frac {b^2 (d x)^{n p}}{\left (a^2+b^2\right ) (a+b x)^2}+\frac {2 a b^2 (d x)^{n p}}{\left (a^2+b^2\right )^2 (a+b x)}+\frac {(d x)^{n p} \left (a^2-b^2-2 a b x\right )}{\left (a^2+b^2\right )^2 \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p} \left (a^2-b^2-2 a b x\right )}{1+x^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 f}+\frac {\left (2 a b^2 (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p}}{a+b x} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 f}+\frac {\left (b^2 (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p}}{(a+b x)^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right ) f}\\ &=\frac {2 b^2 \, _2F_1\left (1,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {b^2 \, _2F_1\left (2,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a^2 \left (a^2+b^2\right ) f (1+n p)}+\frac {\left (\left (a^2-b^2\right ) (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p}}{1+x^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 f}-\frac {\left (2 a b (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{1+n p}}{1+x^2} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right )^2 d f}\\ &=\frac {\left (a^2-b^2\right ) \, _2F_1\left (1,\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);-\tan ^2(e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {2 b^2 \, _2F_1\left (1,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (1+n p)}+\frac {b^2 \, _2F_1\left (2,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n}{a^2 \left (a^2+b^2\right ) f (1+n p)}-\frac {2 a b \, _2F_1\left (1,\frac {1}{2} (2+n p);\frac {1}{2} (4+n p);-\tan ^2(e+f x)\right ) \tan ^2(e+f x) \left (c (d \tan (e+f x))^p\right )^n}{\left (a^2+b^2\right )^2 f (2+n p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.94, size = 231, normalized size = 0.79 \begin {gather*} \frac {\tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n \left (-\frac {b^2 \left (b^2 n p+a^2 (-2+n p)\right ) \, _2F_1\left (1,1+n p;2+n p;-\frac {b \tan (e+f x)}{a}\right )}{a \left (a^2+b^2\right ) (1+n p)}+\frac {b^2}{a+b \tan (e+f x)}+\frac {a \left (\left (a^2-b^2\right ) (2+n p) \, _2F_1\left (1,\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);-\tan ^2(e+f x)\right )-2 a b (1+n p) \, _2F_1\left (1,1+\frac {n p}{2};2+\frac {n p}{2};-\tan ^2(e+f x)\right ) \tan (e+f x)\right )}{\left (a^2+b^2\right ) (1+n p) (2+n p)}\right )}{a \left (a^2+b^2\right ) f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c*(d*Tan[e + f*x])^p)^n/(a + b*Tan[e + f*x])^2,x]

[Out]

(Tan[e + f*x]*(c*(d*Tan[e + f*x])^p)^n*(-((b^2*(b^2*n*p + a^2*(-2 + n*p))*Hypergeometric2F1[1, 1 + n*p, 2 + n*
p, -((b*Tan[e + f*x])/a)])/(a*(a^2 + b^2)*(1 + n*p))) + b^2/(a + b*Tan[e + f*x]) + (a*((a^2 - b^2)*(2 + n*p)*H
ypergeometric2F1[1, (1 + n*p)/2, (3 + n*p)/2, -Tan[e + f*x]^2] - 2*a*b*(1 + n*p)*Hypergeometric2F1[1, 1 + (n*p
)/2, 2 + (n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]))/((a^2 + b^2)*(1 + n*p)*(2 + n*p))))/(a*(a^2 + b^2)*f)

________________________________________________________________________________________

Maple [F]
time = 0.42, size = 0, normalized size = 0.00 \[\int \frac {\left (c \left (d \tan \left (f x +e \right )\right )^{p}\right )^{n}}{\left (a +b \tan \left (f x +e \right )\right )^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x)

[Out]

int((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

integrate(((d*tan(f*x + e))^p*c)^n/(b*tan(f*x + e) + a)^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

integral(((d*tan(f*x + e))^p*c)^n/(b^2*tan(f*x + e)^2 + 2*a*b*tan(f*x + e) + a^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n}}{\left (a + b \tan {\left (e + f x \right )}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))**p)**n/(a+b*tan(f*x+e))**2,x)

[Out]

Integral((c*(d*tan(e + f*x))**p)**n/(a + b*tan(e + f*x))**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n/(a+b*tan(f*x+e))^2,x, algorithm="giac")

[Out]

integrate(((d*tan(f*x + e))^p*c)^n/(b*tan(f*x + e) + a)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (c\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\right )}^n}{{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*tan(e + f*x))^p)^n/(a + b*tan(e + f*x))^2,x)

[Out]

int((c*(d*tan(e + f*x))^p)^n/(a + b*tan(e + f*x))^2, x)

________________________________________________________________________________________